<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no,minimal-ui">
	<title>底部导航</title>

	<style type="text/css">
	*{
		font-size: 16px;
	}
		.footer{
			width: 100%;
			overflow: hidden;
			display: flex;
			height: 8rem;
			padding: 1rem 0;
			border-top: 0.05rem solid #ccc;
			position: fixed;
			bottom: 0;
			left: 0;
		}
		.footer a{
			float: left;
			display: block;
			width: 33%;
			color: #333;
			text-align: center;
			text-decoration: none;
		}
		.footer a img{
			display: inline-block;
			width:4rem;
			height:4rem;
		}
		.footer a p{
			text-align: center;
			font-size: 2.2rem;
			line-height: 3.8rem;
			margin:0;
		}

		.footer a:hover , .footer a:active{
			color: red;
		}

	</style>
</head>
<body>
	<div class="footer" id="footer" >
		{loop $menus $row}
			<a target="iframe1"  id="link_one" href="https://hl.zhycms.com/app/index.php?i=41&c=entry&do=index&m=zh_yjm">
				<img src="{$_W['attachurl']}{$row['img']}">
				<p>{$row['title']}</p>
			</a>
		{/loop}


		<!-- <a target="iframe2" id="link_two" href="https://hl.zhycms.com/app/index.php?i=41&c=entry&do=store&m=zh_yjm">
			<img src="images/store.png">
			<p>服务店</p>
		</a>

		<a target="iframe3" id="link_three" href="https://hl.zhycms.com/app/index.php?i=41&c=entry&do=member&m=zh_yjm">
			<img src="images/my.png">
			<p>我的</p>
		</a> -->
	</div>
</body>
<script type="text/javascript" src='../addons/zh_yjm/template/mobile/js/jquery-2.1.4.js'></script>
<script type="text/javascript">
$(function () {
  $.ajax({
            type:"get",
            url:"{$_W['siteroot']}app/index.php?i={$_W['uniacid']}&c=entry&a=site&do=Menuself&m=zh_yjm",
            async:true,
            dataType:"json",
            data:{},
            success:function(data){
              // alert(data.data.length)
              console.log(data)
               for ( var i=0;i<data.data.length;i++) {
                    var str_nav="<a target='iframe"+(i+1)+"' href="+data.data[i].link+"><img src='https://hl.zhycms.com/attachment/"+data.data[i].img+"'><p>"+data.data[i].title+"</p></a>"
                 $("#footer").append(str_nav)
                  }
            },

            error : function(data) {

                alert(data.msg);

                return false

            }
        })
})

</script>
</html>